import sys, glob, os
from distutils.core import setup
import py2exe

for i in  sys.path: print i
def files(folder):
    for path in glob.glob(folder + '/*'):
        if os.path.isfile(path): yield path


class Target:
    def __init__(self):
        self.version = '0.01'
        self.company_name = 'iloader'
        self.copyright = 'Copyright \xa9 2009 jorjun technical services'
        self.name = 'usb phone detector'
        self.script = os.path.join('detect', 'main.py')
        self.dest_base = 'detect'
        self.description='iloader usb phone detection'

setup(
    cmdclass = {"py2exe": py2exe.build_exe.py2exe},
    console = [Target()],
    windows = [Target()],
    zipfile = None,
    options = {'py2exe': {
        'packages': ['encodings'],
        'optimize': 2,
        'bundle_files' :1,
        'compressed' : 1,
        'includes':  ['usb'],
        'excludes':  [
            'pywin', 'pywin.debugger', 'pywin.debugger.dbgcon',
            'pywin.dialogs', 'pywin.dialogs.list', 'encodings'
            'Tkconstants','Tkinter','tcl','FixTk','PIL.ImageTk','ImageTk',
        ],

    }},
    #data_files=[
    #    ('.', files('dll')),
    #],
)